---
id: 656706afd65547d22bee0b68
title: Step 12
challengeType: 20
dashedName: step-12
---

# --description--

Within the `while` loop, replace `pass` with an `if` statement that checks if the index of `left_part` is less than the index of `right_part`.

Use the `pass` keyword in the body of the `if` statement.

# --hints--

You should replace `pass` keyword with an `if` statement with this condition: `left_part[left_array_index] < right_part[right_array_index]`. Add the `pass` keyword to the body of the `if` statement.

```js
({
 test: () => assert(runPython(`
  _Node(_code).find_function("merge_sort").find_whiles()[0].find_body().is_equivalent("if left_part[left_array_index] < right_part[right_array_index]:\\n  pass")`))
 })
```

# --seed--

## --seed-contents--

```py
def merge_sort(array):

    middle_point = len(array) // 2
    left_part = array[:middle_point]
    right_part = array[middle_point:]

    merge_sort(left_part)
    merge_sort(right_part)

    left_array_index = 0
    right_array_index = 0
    sorted_index = 0

--fcc-editable-region--
    while left_array_index < len(left_part) and right_array_index < len(right_part):
        pass
--fcc-editable-region--
```
